Skip to content

[IncludeHelper] Improvements and Fixing#57

Merged
rulasg merged 25 commits into
mainfrom
improvements
Jun 17, 2026
Merged

[IncludeHelper] Improvements and Fixing#57
rulasg merged 25 commits into
mainfrom
improvements

Conversation

@rulasg

@rulasg rulasg commented Jun 14, 2026

Copy link
Copy Markdown
Owner
  • feat(mock): implement functions for mocking command parameters using JSON

  • feat(base64): add functions for converting to and from base64

  • feat(base64): add documentation for base64 conversion functions

  • refactor(logging): streamline logging functions and add secret removal

  • feat(Invoke-RestAPI): add support for HTTP methods and request body

  • feat(functionParameterHelper): add functions for argument completion and quote handling

  • refactor(Invoke-PrivateContext): change Arguments parameter type from string[] to object[]

  • chore: remove sync scripts for TestingHelper templates

  • fix(Test-MyDebug): improve testSection function and enhance section handling

  • test(MyWrite): update transcript handling for consistency and add new debug section tests

  • fix(Test_CopyIncludeToWorkspace): update test name for consistency

  • fix(Find-ModuleRootPath): improve path resolution and handling of module names

  • feat(fileversion): implement Update-VersionToFile function for version management

  • fix(transcript): use Stop-MyTranscript with array to avoid empty or single line transcripts errors

  • fix(Test_GetIncludeSystemFiles): comment out unused sync files

  • fix(Find-ModuleRootPath): copy module.heler.ps1 for consistency include and test

# We can use this Mock functions to mock the calls to this invokes that use a json to
# transfer an object as parameter.

function Reset-MockSaveParameterToVariable {
Comment thread public/fileversion.ps1 Fixed
# $list | ConvertTo-CompleteResults -wordToComplete $wordToComplete
# }

function ConvertTo-CompleteResults{
Comment thread include/MyWrite.ps1
}
}

function remove-secrets {
Comment thread public/fileversion.ps1 Fixed
$result = @(Stop-MyTranscript)

Assert-Count -Expected 1 -Presented $result
Assert-DbgMsg $result[0] "algoconall" $text2

Invoke-PrivateContext {
param($Arguments)

Comment thread Test/include/base64.ps1
process{
# Encode the string to base64
$ret = [System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($Text))
return $ret

}

function Invoke-MockSaveParameterToVariable{
# When the parameters for an invoke is too big as string, we can use a json
# as a single parameter to hold all the parameters wanted.
#
# We can use this Mock functions to mock the calls to this invokes that use a json to
Comment thread public/setfileversion.ps1
return $header
}

function Remove-VersionHeader($content){
Comment thread public/setfileversion.ps1
@@ -0,0 +1,119 @@
function Set-IncludeFileVersion{
Comment thread public/setfileversion.ps1 Fixed
Comment thread public/setfileversion.ps1
@@ -0,0 +1,119 @@
function Set-IncludeFileVersion{
Comment thread public/getfileversion.ps1
@@ -0,0 +1,33 @@
function Get-IncludeFileVersion{
Comment thread Test/public/setfileversion.test.ps1 Fixed
Comment thread Test/public/setfileversion.test.ps1 Fixed
Comment thread Test/public/setfileversion.test.ps1 Fixed
Comment thread Test/public/setfileversion.test.ps1 Fixed

# Act
$result = Get-IncludeFileVersion -Path "TestFile.ps1"

Comment thread public/setfileversion.ps1

$headerversion = 1
$header = $script:HEADER_V1


$headerversion = $headerversion
$header = $script:TEST_HEADER_V1

Date = $Date
}
}

$headeersizeinlines = $script:TEST_HEADER_V1.Count

$content = Get-Content -Path $Path | Out-String
$json = Build-TestFileVersionJson $Version $Date $headerversion
$headerversion = 1
$version = "1.0.0"
$date = "1975-02-18"
$json = Build-TestFileVersionJson $Version $Date $headerversion
$headerversion = 1
$version = "1.0.0"
$date = "1975-02-18"
$json = Build-TestFileVersionJson $Version $Date $headerversion
@rulasg rulasg merged commit 4075f47 into main Jun 17, 2026
3 checks passed
@rulasg rulasg deleted the improvements branch June 17, 2026 06:59
@rulasg rulasg changed the title Improvements and Fixing [IncludeHelper] Improvements and Fixing Jun 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants